package com.ruoyi.report.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * Fitment Aces Coverage Report 数据表，存储与 Walmart 上产品适配性的相关信息
 * @TableName walmart_fitment_aces_coverage_report
 */
@TableName(value ="walmart_fitment_aces_coverage_report")
@Data
public class WalmartFitmentAcesCoverageReport implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)  // 设置主键和主键策略
    private Long id;
    /**
     * 商品的全球贸易项目编码
     */
    @TableField(value = "gtin")
    private String gtin;

    /**
     * 商品在 Walmart 平台上的唯一标识符
     */
    @TableField(value = "item_id")
    private String itemId;

    /**
     * 商品名称
     */
    @TableField(value = "product_name")
    private String productName;

    /**
     * AAIA 品牌 ID（如果适用）
     */
    @TableField(value = "aaia_brand_id")
    private String aaiaBrandId;

    /**
     * 制造商零件编号
     */
    @TableField(value = "manufacturer_part_number")
    private String manufacturerPartNumber;

    /**
     * 零件术语 ID
     */
    @TableField(value = "part_terminology_id")
    private String partTerminologyId;

    /**
     * 唯一请求id
     */
    @TableField(value = "request_id")
    private String requestId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        WalmartFitmentAcesCoverageReport other = (WalmartFitmentAcesCoverageReport) that;
        return (this.getGtin() == null ? other.getGtin() == null : this.getGtin().equals(other.getGtin()))
            && (this.getItemId() == null ? other.getItemId() == null : this.getItemId().equals(other.getItemId()))
            && (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
            && (this.getAaiaBrandId() == null ? other.getAaiaBrandId() == null : this.getAaiaBrandId().equals(other.getAaiaBrandId()))
            && (this.getManufacturerPartNumber() == null ? other.getManufacturerPartNumber() == null : this.getManufacturerPartNumber().equals(other.getManufacturerPartNumber()))
            && (this.getPartTerminologyId() == null ? other.getPartTerminologyId() == null : this.getPartTerminologyId().equals(other.getPartTerminologyId()))
            && (this.getRequestId() == null ? other.getRequestId() == null : this.getRequestId().equals(other.getRequestId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGtin() == null) ? 0 : getGtin().hashCode());
        result = prime * result + ((getItemId() == null) ? 0 : getItemId().hashCode());
        result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
        result = prime * result + ((getAaiaBrandId() == null) ? 0 : getAaiaBrandId().hashCode());
        result = prime * result + ((getManufacturerPartNumber() == null) ? 0 : getManufacturerPartNumber().hashCode());
        result = prime * result + ((getPartTerminologyId() == null) ? 0 : getPartTerminologyId().hashCode());
        result = prime * result + ((getRequestId() == null) ? 0 : getRequestId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", gtin=").append(gtin);
        sb.append(", itemId=").append(itemId);
        sb.append(", productName=").append(productName);
        sb.append(", aaiaBrandId=").append(aaiaBrandId);
        sb.append(", manufacturerPartNumber=").append(manufacturerPartNumber);
        sb.append(", partTerminologyId=").append(partTerminologyId);
        sb.append(", requestId=").append(requestId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}